fix: system theme#2524
Conversation
Greptile SummaryThis PR switches system-theme synchronization to browser color-scheme events. The main changes are:
Confidence Score: 5/5The changed flow looks mergeable after two small compatibility and notification fixes.
src/palettes/changeTheme/index.js and src/theme/preInstalled.js Important Files Changed
Reviews (1): Last reviewed commit: "fix: system theme" | Re-trigger Greptile |
| function startSystemThemeWatcher() { | ||
| if (intervalId) return; | ||
| intervalId = setInterval(syncSystemTheme, updateTimeMs); | ||
| darkModeMediaQuery.addEventListener("change", syncSystemTheme); |
There was a problem hiding this comment.
Legacy Media Query Listener Crash
When a WebView supports matchMedia but exposes only addListener, selecting the system theme now throws because addEventListener is undefined. The previous polling path worked in this runtime, so system-theme synchronization needs matching addListener and removeListener fallbacks.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
🔴 (Workflow Trigger stopped), Your On-Demand Preview Release/build for #2524. |
Closes #2521